package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName mks_company
 */
@ApiModel(description = "公司")
@TableName(value ="mks_company")
@Data
public class Company implements Serializable {
    /**
     * 
     */
    @ApiModelProperty("")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 公司名称
     */
    @ApiModelProperty("公司名称")
    private String cname;

    /**
     * 联系人
     */
    @ApiModelProperty("联系人")
    private String coontacts;

    /**
     * 电话
     */
    @ApiModelProperty("电话")
    private String phonenum;

    /**
     * 固定电话
     */
    @ApiModelProperty("固定电话")
    private String fixedNum;

    /**
     * 业务类型(自驾长包，代驾长包，自驾零单，代驾零单，其他)
     */
    @ApiModelProperty("业务类型(自驾长包，代驾长包，自驾零单，代驾零单，其他)")
    private String type;

    /**
     * 租赁合作时间（一月以内，一月到一年，一年。。。五年以上）
     */
    @ApiModelProperty("租赁合作时间（一月以内，一月到一年，一年。。。五年以上）")
    private String leaseTime;

    /**
     * 城市
     */
    @ApiModelProperty("城市")
    private String city;

    /**
     * 邮箱
     */
    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Company other = (Company) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCname() == null ? other.getCname() == null : this.getCname().equals(other.getCname()))
            && (this.getCoontacts() == null ? other.getCoontacts() == null : this.getCoontacts().equals(other.getCoontacts()))
            && (this.getPhonenum() == null ? other.getPhonenum() == null : this.getPhonenum().equals(other.getPhonenum()))
            && (this.getFixedNum() == null ? other.getFixedNum() == null : this.getFixedNum().equals(other.getFixedNum()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getLeaseTime() == null ? other.getLeaseTime() == null : this.getLeaseTime().equals(other.getLeaseTime()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCname() == null) ? 0 : getCname().hashCode());
        result = prime * result + ((getCoontacts() == null) ? 0 : getCoontacts().hashCode());
        result = prime * result + ((getPhonenum() == null) ? 0 : getPhonenum().hashCode());
        result = prime * result + ((getFixedNum() == null) ? 0 : getFixedNum().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getLeaseTime() == null) ? 0 : getLeaseTime().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cname=").append(cname);
        sb.append(", coontacts=").append(coontacts);
        sb.append(", phonenum=").append(phonenum);
        sb.append(", fixedNum=").append(fixedNum);
        sb.append(", type=").append(type);
        sb.append(", leaseTime=").append(leaseTime);
        sb.append(", city=").append(city);
        sb.append(", email=").append(email);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}